function AddThousandSeparator(S: string; Chr: Char): string;
var 
  I: Integer;
begin
  Result := S;
  I := Length(S) - 2;
  while I > 1 do 
  begin
    Insert(Chr, Result, I);
    I := I - 3;
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Edit1.Text := AddThousandSeparator('400500210', '''');
  // -- 400'500'210
end;
 label1.Caption := FormatFloat('#,###,###.###', 23453452);